import time from './time'
function type(obj) {
  for (var key in obj) {
    switch (obj[key].tid) {
      case 1:
        obj[key].typename = '代取快递'
        break
      case 2:
        obj[key].typename = '代取外卖'
        break
      case 3:
        obj[key].typename = '教室占座'
        break
      case 4:
        obj[key].typename = '食堂带餐'
        break
      default:
        break
    }
    switch (obj[key].tid) {
      case 1:
        obj[key].typeicon = 'logistics'
        break
      case 2:
        obj[key].typeicon = 'point-gift-o'
        break
      case 3:
        obj[key].typeicon = 'desktop-o'
        break
      case 4:
        obj[key].typeicon = 'gift-card-o'
        break
      default:
        break
    }
    obj[key].ctime = time(obj[key].cTime)
  }
  return obj
}
export default type